package com.xu.lambda;

import java.util.function.Function;

/**
 *
 * @author xudenghui
 * @create 2023-04-05 14:15
 **/
public class FunctionDemo {
    public static void main(String[] args) {
     Function<String,Integer> length =  (String s)->s.length();
     Integer num = length.apply("字符串长度");
     System.out.println(num);

     Function<Integer,Integer> num1 = p -> p+10;
     System.out.println(num1.apply(3));
    }

}
